package com.eastdigit.system.model;

import net.sf.json.JSONObject;

import java.io.Serializable;

public class Menu extends Entity implements Serializable {
    private String id;

    private String parentId;

    private String name;

    private String icon;

    private String url;

    private String ctrlName;

    private String ctrlPath;

    private String templateUrl;

    private int order;

    private String type;

    private String state;

    private String extra1;

    private static final long serialVersionUID = 1L;

    public JSONObject toJSONObject() {
        JSONObject j = new JSONObject();
        j.put("menuId", id);
        j.put("menuName", name);
        j.put("parentMenuId", parentId);
        j.put("menuUrl", url);
        j.put("menuType", type);
        j.put("menuIcon", icon);
        j.put("ctrlName", ctrlName);
        j.put("ctrlPath", ctrlPath);
        j.put("templateUrl", templateUrl);
        j.put("menuState", state);
        j.put("menuOrder", order);
        j.put("icon", icon);
        // j.put("remark", remark);
        return j;
    }

    public JSONObject toJSONObjectSimple() {
        JSONObject j = new JSONObject();
        j.put("menuId", id);
        j.put("menuName", name);
        j.put("parentMenuId", parentId);
        j.put("menuUrl", url);
        j.put("menuType", type);
        return j;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getCtrlName() {
        return ctrlName;
    }

    public void setCtrlName(String ctrlName) {
        this.ctrlName = ctrlName;
    }

    public String getCtrlPath() {
        return ctrlPath;
    }

    public void setCtrlPath(String ctrlPath) {
        this.ctrlPath = ctrlPath;
    }

    public String getTemplateUrl() {
        return templateUrl;
    }

    public void setTemplateUrl(String templateUrl) {
        this.templateUrl = templateUrl;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getExtra1() {
        return extra1;
    }

    public void setExtra1(String extra1) {
        this.extra1 = extra1;
    }
}
